package org.jeecg.modules.demo.userexist.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 开心网吧
 * @Author: jeecg-boot
 * @Date:   2021-03-04
 * @Version: V1.0
 */
@Data
@TableName("hc_cq_userexistdata")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class UserExistCountData implements Serializable {

    private static final long serialVersionUID = 1L;

    /**主键*/
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;

    private String regUserNum;
    private String ctime;
    private String system;
    private String tableName;
    private String channelName;
    private String type;

    private Integer day2=0;
    private Integer day3=0;
    private Integer day4=0;
    private Integer day5=0;
    private Integer day6=0;
    private Integer day7=0;
    private Integer day14=0;
    private Integer day15=0;
    private Integer day16=0;
    private Integer day30=0;

    private String day;

    public void setDay(Double day){
        if(day>=1.0&&day<2.0){
            setDay2(getDay2()+1);
        }else if(day>=2.0&&day<=3.0){
            setDay3(getDay3()+1);
        }else if(day>=3.0&&day<4.0){
            this.day4++;
        }else if(day>=4.0&&day<5.0){
            setDay5(getDay5()+1);
        }else if(day>=5.0&&day<6.0){
            this.setDay6(this.getDay6()+1);
        }else if(day>=6.0&&day<14.0){ //7-14的玩家
            this.setDay7(this.getDay7()+1);
        }else if(day>=14.0&&day<15.0){
            this.setDay14(this.getDay14()+1);
        }else if(day>=15.0&&day<16.0){
            this.setDay15(this.getDay15()+1);
        }else if(day>=16.0&&day<30.0){
            this.setDay16(this.getDay16()+1);
        }else if(day>=30.0&&day<=31.0){//16天-30天的玩家
            this.setDay30(this.getDay30()+1);
        }
    }
}
